package com.lmt_13;

import java.io.*;
import java.util.Arrays;

public class CopyTest {
    public static void main(String[] args) throws Exception {
        File file = new File("src/com/lmt_13/1.txt");
        long len = file.length();
        try (

                InputStream input = new FileInputStream("src/com/lmt_13/1.txt");
                OutputStream output = new FileOutputStream("src/com/lmt_13/2.txt",true) ; // 在文件后面追加
                ) {

            byte []datas = new byte[(int) len];
            input.read(datas);

            output.write(datas);

        }catch (Exception e){
            e.printStackTrace();
        }




    }
}
